<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var str="怎么搞，搞什么，how to do，what to do";
			var arr=[100000,200000,300000,400000,500000,600000,700000,800000,900000];
			console.log(arr.length);
			for(var i=0,codes="";i<str.length;i++){
				var r=parseInt(Math.random()*(arr.length-1+0+1)+0);//0-8的随机数
				console.log(r);
				code=str.charCodeAt(i)+arr[r];				
				console.log(str.charCodeAt(i));
				codes+=code;
			}
			
			console.log(codes);
			
			for(var j=0,yuan="";j<codes.length;j+=6){
				var ascii=codes.slice(j+1,j+6);
				yuan+=String.fromCharCode(ascii);
			}
			
			console.log(yuan);
		</script>
	</body>
</html>
